package modifer_d5;
//重写方法
public class Fu {
    public String name;
    public String sex;

    public Fu() {
    }

    public Fu(String name, String sex) {
        this.name = name;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    //重写toString方法
    @Override
    public String toString() {
        return "Fu{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }
}
